home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / g_man / cat3 / OpenGL / glxintro.z / glxintro
Encoding:
Text File  |  2002-10-03  |  38.3 KB  |  529 lines

  1.  
  2.  
  3.  
  4. ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ---- GGGGLLLLXXXX                ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllXXXXIIIInnnnttttrrrroooo - Introduction to OpenGL in the X window system
  10.  
  11.  
  12.  
  13. OOOOVVVVEEEERRRRVVVVIIIIEEEEWWWW
  14.      OpenGL (called GL in other pages) is a high-performance 3D-oriented
  15.      renderer.  It is available in the X window system through the GLX
  16.      extension.  To determine whether the GLX extension is supported by an X
  17.      server, and if so, what version is supported, call ggggllllXXXXQQQQuuuueeeerrrryyyyEEEExxxxtttteeeennnnssssiiiioooonnnn and
  18.      ggggllllXXXXQQQQuuuueeeerrrryyyyVVVVeeeerrrrssssiiiioooonnnn.
  19.  
  20.      GLX extended X servers make a subset of their visuals available for
  21.      OpenGL rendering.  Drawables created with these visual can also be
  22.      rendered into using the core X renderer and or any other X extension that
  23.      is compatible with all core X visuals.
  24.  
  25.      GLX extends a drawable's standard color buffer with additional buffers.
  26.      These buffers include back and auxiliary color buffers, a depth buffer, a
  27.      stencil buffer, and a color accumulation buffer.  Some or all of the
  28.      buffers listed are included in each X visual that supports OpenGL.
  29.  
  30.      GLX supports rendering into three types of drawables: windows, pixmaps
  31.      and pbuffers (pixel buffers). GLX windows and pixmaps are X resources,
  32.      and capable of accepting core X rendering as well as OpenGL rendering.
  33.      GLX pbuffers are GLX only resources, and might not accept core X
  34.      rendering.
  35.  
  36.      To render using OpenGL into a GLX drawable, you must determine the
  37.      appropriate GLXFBConfig which supports the rendering features your
  38.      application requires. ggggllllXXXXCCCChhhhoooooooosssseeeeFFFFBBBBCCCCoooonnnnffffiiiigggg returns a GLXFBConfig matching
  39.      the required attributes, or NNNNUUUULLLLLLLL if no match is found.  A complete list
  40.      of GLXFBConfigs supported by a server can be obtained by calling
  41.      ggggllllXXXXGGGGeeeettttFFFFBBBBCCCCoooonnnnffffiiiiggggssss.  Attributes of a particular GLXFBConfig can be queried
  42.      by calling ggggllllXXXXGGGGeeeettttFFFFBBBBCCCCoooonnnnffffiiiiggggAAAAttttttttrrrriiiibbbb.
  43.  
  44.      For GLX windows and pixmaps, a suitable X drawable (using either
  45.      XXXXCCCCrrrreeeeaaaatttteeeeWWWWiiiinnnnddddoooowwww or XXXXCCCCrrrreeeeaaaatttteeeePPPPiiiixxxxmmmmaaaapppp, respectively) with a matching visual must
  46.      be created first.  Call ggggllllXXXXGGGGeeeettttVVVViiiissssuuuuaaaallllFFFFrrrroooommmmFFFFBBBBCCCCoooonnnnffffiiiigggg to obtain the necessary
  47.      XVisualInfo structure for creating the X drawable.  For pbuffers, no
  48.      underlying X drawable is required.
  49.  
  50.      To create a GLX window from an X window, call ggggllllXXXXCCCCrrrreeeeaaaatttteeeeWWWWiiiinnnnddddoooowwww.  Likewise,
  51.      to create a GLX pixmap, call ggggllllXXXXCCCCrrrreeeeaaaatttteeeePPPPiiiixxxxmmmmaaaapppp. Pbuffers are created by
  52.      calling ggggllllXXXXCCCCrrrreeeeaaaatttteeeePPPPbbbbuuuuffffffffeeeerrrr.  Use ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyWWWWiiiinnnnddddoooowwww, ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyPPPPiiiixxxxmmmmaaaapppp, and
  53.      ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyPPPPbbbbuuuuffffffffeeeerrrr to release previously allocated resources.
  54.  
  55.      A GLX context is required to bind OpenGL rendering to a GLX resource.  A
  56.      GLX resource and rendering context must have compatible GLXFBConfigs.  To
  57.      create a GLX context, call ggggllllXXXXCCCCrrrreeeeaaaatttteeeeNNNNeeeewwwwCCCCoooonnnntttteeeexxxxtttt.  A context may be bound
  58.      to a GLX drawable by using ggggllllXXXXMMMMaaaakkkkeeeeCCCCoooonnnntttteeeexxxxttttCCCCuuuurrrrrrrreeeennnntttt.  This context/drawable
  59.      pair becomes the current context and current drawable, and is used by all
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ---- GGGGLLLLXXXX                ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      OpenGL rendering commands until ggggllllXXXXMMMMaaaakkkkeeeeCCCCoooonnnntttteeeexxxxttttCCCCuuuurrrrrrrreeeennnntttt is called with
  75.      different arguments.
  76.  
  77.      Both core X and OpenGL commands can be used to operate on drawables,
  78.      however, the X and OpenGL command streams are not synchronized.
  79.      Synchronization can be explicitly specified using by calling ggggllllXXXXWWWWaaaaiiiittttGGGGLLLL,
  80.      ggggllllXXXXWWWWaaaaiiiittttXXXX, XXXXSSSSyyyynnnncccc, and XXXXFFFFlllluuuusssshhhh.
  81.  
  82. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  83.      Below is a minimal example of creating an RGBA-format, X window that's
  84.      compatible with OpenGL using GLX 1.3 commands.  The window is cleared to
  85.      yellow when the program runs.  The program does minimal error checking;
  86.      all return values should be checked.
  87.  
  88.           #include <stdio.h>
  89.           #include <stdlib.h>
  90.           #include <GL/gl.h>
  91.           #include <GL/glx.h>
  92.  
  93.           int singleBufferAttributess[] = {
  94.               GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
  95.               GLX_RENDER_TYPE,   GLX_RGBA_BIT,
  96.               GLX_RED_SIZE,      1,   /* Request a single buffered color buffer */
  97.               GLX_GREEN_SIZE,    1,   /* with the maximum number of color bits  */
  98.               GLX_BLUE_SIZE,     1,   /* for each component                     */
  99.               None
  100.           };
  101.  
  102.           int doubleBufferAttributes[] = {
  103.               GLX_DRAWABLE_TYPE, GLX_WINDOW_BIT,
  104.               GLX_RENDER_TYPE,   GLX_RGBA_BIT,
  105.               GLX_DOUBLEBUFFER,  True,  /* Request a double-buffered color buffer with */
  106.               GLX_RED_SIZE,      1,     /* the maximum number of bits per component    */
  107.               GLX_GREEN_SIZE,    1,
  108.               GLX_BLUE_SIZE,     1,
  109.               None
  110.           };
  111.  
  112.  
  113.           static Bool WaitForNotify( Display *dpy, XEvent *event, XPointer arg ) {
  114.               return (event->type == MapNotify) && (event->xmap.window == (Window) arg);
  115.           }
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ---- GGGGLLLLXXXX                ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))
  137.  
  138.  
  139.  
  140.           int main( int argc, char *argv[] )
  141.           {
  142.               Display              *dpy;
  143.               Window                xWin;
  144.               XEvent                event;
  145.               XVisualInfo          *vInfo;
  146.               XSetWindowAttributes  swa;
  147.               GLXFBConfig          *fbConfigs;
  148.               GLXContext            context;
  149.               GLXWindow             glxWin;
  150.               int                   swaMask;
  151.               int                   numReturned;
  152.               int                   swapFlag = True;
  153.  
  154.               /* Open a connection to the X server */
  155.               dpy = XOpenDisplay( NULL );
  156.               if ( dpy == NULL ) {
  157.                   printf( "Unable to open a connection to the X server\n" );
  158.                   exit( EXIT_FAILURE );
  159.               }
  160.  
  161.               /* Request a suitable framebuffer configuration - try for a double
  162.               ** buffered configuration first */
  163.               fbConfigs = glXChooseFBConfig( dpy, DefaultScreen(dpy),
  164.                                              doubleBufferAttributes, &numReturned );
  165.  
  166.               if ( fbConfigs == NULL ) {  /* no double buffered configs available */
  167.                 fbConfigs = glXChooseFBConfig( dpy, DefaultScreen(dpy),
  168.                                                singleBufferAttributess, &numReturned );
  169.                 swapFlag = False;
  170.               }
  171.  
  172.               /* Create an X colormap and window with a visual matching the first
  173.               ** returned framebuffer config */
  174.               vInfo = glXGetVisualFromFBConfig( dpy, fbConfigs[0] );
  175.  
  176.               swa.border_pixel = 0;
  177.               swa.event_mask = StructureNotifyMask;
  178.               swa.colormap = XCreateColormap( dpy, RootWindow(dpy, vInfo->screen),
  179.                                               vInfo->visual, AllocNone );
  180.  
  181.               swaMask = CWBorderPixel | CWColormap | CWEventMask;
  182.  
  183.               xWin = XCreateWindow( dpy, RootWindow(dpy, vInfo->screen), 0, 0, 256, 256,
  184.                                     0, vInfo->depth, InputOutput, vInfo->visual,
  185.                                     swaMask, &swa );
  186.  
  187.               /* Create a GLX context for OpenGL rendering */
  188.               context = glXCreateNewContext( dpy, fbConfigs[0], GLX_RGBA_TYPE,
  189.                                NULL, True );
  190.  
  191.               /* Create a GLX window to associate the frame buffer configuration
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ---- GGGGLLLLXXXX                ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))
  203.  
  204.  
  205.  
  206.               ** with the created X window */
  207.               glxWin = glXCreateWindow( dpy, fbConfigs[0], xWin, NULL );
  208.  
  209.               /* Map the window to the screen, and wait for it to appear */
  210.               XMapWindow( dpy, xWin );
  211.               XIfEvent( dpy, &event, WaitForNotify, (XPointer) xWin );
  212.  
  213.               /* Bind the GLX context to the Window */
  214.               glXMakeContextCurrent( dpy, glxWin, glxWin, context );
  215.  
  216.               /* OpenGL rendering ... */
  217.               glClearColor( 1.0, 1.0, 0.0, 1.0 );
  218.               glClear( GL_COLOR_BUFFER_BIT );
  219.  
  220.               glFlush();
  221.  
  222.               if ( swapFlag )
  223.                   glXSwapBuffers( dpy, glxWin );
  224.  
  225.               sleep( 10 );
  226.               exit( EXIT_SUCCESS );
  227.           }
  228.  
  229.  
  230. NNNNOOOOTTTTEEEESSSS
  231.      An X color map must be created and passed to XXXXCCCCrrrreeeeaaaatttteeeeWWWWiiiinnnnddddoooowwww.
  232.  
  233.      A GLX context must be created and bound to a GLX drawable before OpenGL
  234.      commands can be executed.  OpenGL commands executed while no
  235.      context/drawable pair is current result in undefined behavior.
  236.  
  237.      Exposure events indicate that _a_l_l buffers associated with the specified
  238.      window may be damaged and should be repainted. Although certain buffers
  239.      of some visuals on some systems may never require repainting (the depth
  240.      buffer, for example), it is incorrect to write a program assuming that
  241.      these buffers will not be damaged.
  242.  
  243.      GLX commands utilize XVisualInfo structures rather than pointers to
  244.      visuals or visualIDs directly.  XVisualInfo structures contain _v_i_s_u_a_l,
  245.      _v_i_s_u_a_l_I_D, _s_c_r_e_e_n, and _d_e_p_t_h elements, as well as other X-specific
  246.      information.
  247.  
  248.  
  249. GGGGLLLLXXXX EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS
  250.      The SSSSGGGGIIII____vvvviiiiddddeeeeoooo____ssssyyyynnnncccc extension provides a means for synchronization with
  251.      the video frame rate of a monitor--or, in the case of an interlaced
  252.      monitor, with the field rate of the monitor. For more information see:
  253.      ggggllllXXXXGGGGeeeettttVVVViiiiddddeeeeooooSSSSyyyynnnnccccSSSSGGGGIIII, ggggllllXXXXWWWWaaaaiiiittttVVVViiiiddddeeeeooooSSSSyyyynnnnccccSSSSGGGGIIII.
  254.  
  255.      The SSSSGGGGIIII____sssswwwwaaaapppp____ccccoooonnnnttttrrrroooollll extension provides new parameters that modify the
  256.      semantics of ggggllllXXXXSSSSwwwwaaaappppBBBBuuuuffffffffeeeerrrrssss. With this extension an application can
  257.      specify a minimum periodicity for color buffer swaps, measured in display
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268. ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ---- GGGGLLLLXXXX                ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))
  269.  
  270.  
  271.  
  272.      retrace periods.  For more information see ggggllllXXXXSSSSwwwwaaaappppIIIInnnntttteeeerrrrvvvvaaaallllSSSSGGGGIIII.
  273.  
  274.      The EEEEXXXXTTTT____iiiimmmmppppoooorrrrtttt____ccccoooonnnntttteeeexxxxtttt allows multiple X clients to share an indirect
  275.      rendering context. Also, two convenience routines are added: one to get
  276.      the display for the current context and one to retrieve the attributes
  277.      that a context was created with. For more information see
  278.      ggggllllXXXXGGGGeeeettttCCCCuuuurrrrrrrreeeennnnttttDDDDiiiissssppppllllaaaayyyyEEEEXXXXTTTT, ggggllllXXXXQQQQuuuueeeerrrryyyyCCCCoooonnnntttteeeexxxxttttIIIInnnnffffooooEEEEXXXXTTTT, ggggllllXXXXGGGGeeeettttCCCCoooonnnntttteeeexxxxttttIIIIDDDDEEEEXXXXTTTT,
  279.      ggggllllXXXXIIIImmmmppppoooorrrrttttCCCCoooonnnntttteeeexxxxttttEEEEXXXXTTTT, and ggggllllXXXXFFFFrrrreeeeeeeeCCCCoooonnnntttteeeexxxxttttEEEEXXXXTTTT.
  280.  
  281.      The EEEEXXXXTTTT____vvvviiiissssuuuuaaaallll____rrrraaaattttiiiinnnngggg extension allows servers to identify a particular
  282.      GLX visual as undesirable. A new visual attribute is introduced,
  283.      providing a way for servers to specify caveats (e.g., slow or non-
  284.      conformant) for a visual. The attribute may be queried using
  285.      ggggllllXXXXGGGGeeeettttCCCCoooonnnnffffiiiigggg; it is also used by ggggllllXXXXCCCChhhhoooooooosssseeeeVVVViiiissssuuuuaaaallll to discriminate against
  286.      visuals with caveats.
  287.  
  288.      This extension allows servers to export visuals with improved features or
  289.      image quality, but lower performance or greater system burden, without
  290.      having to have these visuals selected preferentially.
  291.  
  292.      The EEEEXXXXTTTT____vvvviiiissssuuuuaaaallll____iiiinnnnffffoooo extension allows the user to request a particular X
  293.      visual type to be associated with a GLX visual, and allows the user to
  294.      query the X visual type underlying a GLX visual. In addition, this
  295.      extension provides a means to request a visual with a transparent pixel
  296.      and to query whether a visual supports a transparent pixel value and the
  297.      value of the transparent pixel.
  298.  
  299.      The SSSSGGGGIIIIXXXX____ffffbbbbccccoooonnnnffffiiiigggg extension introduces a new way to describe the
  300.      capabilities of a GLX drawable (i.e., to describe the depth of color
  301.      buffer components and the type and size of ancillary buffers), removes
  302.      the "similarity" requirement when making a context current to a drawable,
  303.      and supports RGBA rendering to one- and two-component Windows and GLX
  304.      Pixmaps. For more information see ggggllllXXXXGGGGeeeettttFFFFBBBBCCCCoooonnnnffffiiiiggggAAAAttttttttrrrriiiibbbbSSSSGGGGIIIIXXXX,
  305.      ggggllllXXXXCCCChhhhoooooooosssseeeeFFFFBBBBCCCCoooonnnnffffiiiiggggSSSSGGGGIIIIXXXX, ggggllllXXXXCCCCrrrreeeeaaaatttteeeeGGGGLLLLXXXXPPPPiiiixxxxmmmmaaaappppWWWWiiiitttthhhhCCCCoooonnnnffffiiiiggggSSSSGGGGIIIIXXXX,
  306.      ggggllllXXXXCCCCrrrreeeeaaaatttteeeeCCCCoooonnnntttteeeexxxxttttWWWWiiiitttthhhhCCCCoooonnnnffffiiiiggggSSSSGGGGIIIIXXXX, ggggllllXXXXGGGGeeeettttVVVViiiissssuuuuaaaallllFFFFrrrroooommmmFFFFBBBBCCCCoooonnnnffffiiiiggggSSSSGGGGIIIIXXXX,
  307.      ggggllllXXXXGGGGeeeettttFFFFBBBBCCCCoooonnnnffffiiiiggggFFFFrrrroooommmmVVVViiiissssuuuuaaaallllSSSSGGGGIIIIXXXX.
  308.  
  309.      The SSSSGGGGIIIIXXXX____ppppbbbbuuuuffffffffeeeerrrr extension defines GLX pixel buffers, which are
  310.      additional non-visible rendering buffers for an OpenGL renderer.  GLX
  311.      pixel buffers are typically allocated in non-visible frame buffer memory.
  312.      They are intended to be "static" resources, in that a program will
  313.      typically allocate them only once, rather than as a part of its rendering
  314.      loop. Also the frame buffer resources that are associated with a GLX
  315.      pixel buffer are static, and are deallocated only when the GLXPbuffer is
  316.      destroyed, or, in the case of a _u_n_p_r_e_s_e_r_v_e_d GLX pixel buffer, as a result
  317.      of X server activity that changes its frame buffer requirements.  For
  318.      more information see ggggllllXXXXCCCCrrrreeeeaaaatttteeeeGGGGLLLLXXXXPPPPbbbbuuuuffffffffeeeerrrrSSSSGGGGIIIIXXXX, ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyGGGGLLLLXXXXPPPPbbbbuuuuffffffffeeeerrrrSSSSGGGGIIIIXXXX,
  319.      ggggllllXXXXQQQQuuuueeeerrrryyyyGGGGLLLLXXXXPPPPbbbbuuuuffffffffeeeerrrrSSSSGGGGIIIIXXXX, ggggllllXXXXSSSSeeeelllleeeeccccttttEEEEvvvveeeennnnttttSSSSGGGGIIIIXXXX, ggggllllXXXXGGGGeeeettttSSSSeeeelllleeeecccctttteeeeddddEEEEvvvveeeennnnttttSSSSGGGGIIIIXXXX.
  320.      SSSSGGGGIIIIXXXX____ppppbbbbuuuuffffffffeeeerrrr is only supported on RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222, and VVVVTTTTXXXX
  321.      systems, IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems, SSSSoooolllliiiidddd IIIImmmmppppaaaacccctttt systems, HHHHiiiigggghhhh IIIImmmmppppaaaacccctttt and
  322.      MMMMaaaaxxxxiiiimmmmuuuummmm IIIImmmmppppaaaacccctttt systems, OOOO2222 systems, and OOOOccccttttaaaannnneeee2222 VVVVPPPPrrrroooo systems.
  323.  
  324.  
  325.  
  326.  
  327.                                                                         PPPPaaaaggggeeee 5555
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334. ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ---- GGGGLLLLXXXX                ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))
  335.  
  336.  
  337.  
  338.      The SSSSGGGGIIIIXXXX____ddddmmmm____ppppbbbbuuuuffffffffeeeerrrr extension, with the addition of a DigitalMedia
  339.      attribute, defines a type of GLX pixel buffer that can acquire one or
  340.      more of its renderable buffers from a DMbuffer generated by video,
  341.      compression, or other media library. A single DigitalMedia pixel buffer
  342.      can be associated with a sequence of DMbuffers having the same
  343.      configuration, making them directly OpenGL readable and renderable.
  344.      Frame buffer resources that are not acquired from the DMbuffer are
  345.      identical to those of a standard GLX pixel buffer. For more information
  346.      see ggggllllXXXXCCCCrrrreeeeaaaatttteeeeGGGGLLLLXXXXPPPPbbbbuuuuffffffffeeeerrrrSSSSGGGGIIIIXXXX, ggggllllXXXXAAAAssssssssoooocccciiiiaaaatttteeeeDDDDMMMMPPPPbbbbuuuuffffffffeeeerrrrSSSSGGGGIIIIXXXX, DDDDMMMMbbbbuuuuffffffffeeeerrrr,
  347.      ddddmmmmBBBBuuuuffffffffeeeerrrrGGGGeeeettttGGGGLLLLPPPPoooooooollllPPPPaaaarrrraaaammmmssss.  SSSSGGGGIIIIXXXX____ddddmmmm____ppppbbbbuuuuffffffffeeeerrrr is only supported on OOOO2222
  348.      systems.
  349.  
  350.      The SSSSGGGGIIIISSSS____mmmmuuuullllttttiiiissssaaaammmmpppplllleeee extension provides a mechanism to antialias all
  351.      primitives. (This extension is described in more detail in ggggllllIIIInnnnttttrrrroooo.) In
  352.      order to support multisampling both GLX and OpenGL had to be extended.
  353.      The GLX portion of the extension, designated as GGGGLLLLXXXX____SSSSGGGGIIIISSSS____mmmmuuuullllttttiiiissssaaaammmmpppplllleeee,
  354.      includes new visual attributes which can be specified when calling
  355.      ggggllllXXXXCCCChhhhoooooooosssseeeeVVVViiiissssuuuuaaaallll and ggggllllXXXXGGGGeeeettttCCCCoooonnnnffffiiiigggg. SSSSGGGGIIIISSSS____mmmmuuuullllttttiiiissssaaaammmmpppplllleeee is only supported on
  356.      RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222, and VVVVTTTTXXXX systems, and IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy
  357.      systems.
  358.  
  359.      The SSSSGGGGIIII____mmmmaaaakkkkeeee____ccccuuuurrrrrrrreeeennnntttt____rrrreeeeaaaadddd extension allows OpenGL pixel operations to
  360.      read pixel data from the buffers of one drawable and draw into the
  361.      buffers of another.  For example, pixels can be copied from one window
  362.      into another, or from a GLX pixel buffer into a window.  For more
  363.      information see ggggllllXXXXMMMMaaaakkkkeeeeCCCCuuuurrrrrrrreeeennnnttttRRRReeeeaaaaddddSSSSGGGGIIII and ggggllllXXXXGGGGeeeettttCCCCuuuurrrrrrrreeeennnnttttRRRReeeeaaaaddddDDDDrrrraaaawwwwaaaabbbblllleeeeSSSSGGGGIIII.
  364.      SSSSGGGGIIII____mmmmaaaakkkkeeee____ccccuuuurrrrrrrreeeennnntttt____rrrreeeeaaaadddd is only supported on RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222,
  365.      and VVVVTTTTXXXX systems, IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems, SSSSoooolllliiiidddd IIIImmmmppppaaaacccctttt systems, HHHHiiiigggghhhh
  366.      IIIImmmmppppaaaacccctttt and MMMMaaaaxxxxiiiimmmmuuuummmm IIIImmmmppppaaaacccctttt systems, OOOO2222 systems, and OOOOccccttttaaaannnneeee2222 VVVVPPPPrrrroooo systems.
  367.  
  368.      The SSSSGGGGIIIIXXXX____vvvviiiiddddeeeeoooo____ssssoooouuuurrrrcccceeee extension allows pixel data to be sourced from a
  369.      video input stream.  It defines a new type of drawable,
  370.      GLXVideoSourceSGIX, that represents the drain node of a Video Library
  371.      (VL) path.  A GLXVideoSourceSGIX may be passed as a parameter to
  372.      ggggllllXXXXMMMMaaaakkkkeeeeCCCCuuuurrrrrrrreeeennnnttttRRRReeeeaaaaddddSSSSGGGGIIII to indicate that pixel data should be read from the
  373.      specified video source instead of from the framebuffer.  For more
  374.      information, see ggggllllXXXXCCCCrrrreeeeaaaatttteeeeGGGGLLLLXXXXVVVViiiiddddeeeeooooSSSSoooouuuurrrrcccceeeeSSSSGGGGIIIIXXXX and
  375.      ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyGGGGLLLLXXXXVVVViiiiddddeeeeooooSSSSoooouuuurrrrcccceeeeSSSSGGGGIIIIXXXX.  SSSSGGGGIIIIXXXX____vvvviiiiddddeeeeoooo____ssssoooouuuurrrrcccceeee is only supported on
  376.      RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee, RRRReeeeaaaalllliiiittttyyyyEEEEnnnnggggiiiinnnneeee2222, and VVVVTTTTXXXX systems, and IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy
  377.      systems.
  378.  
  379.      The SSSSGGGGIIIIXXXX____vvvviiiiddddeeeeoooo____rrrreeeessssiiiizzzzeeee extension allows the frame buffer to be resized to
  380.      the output resolution of the video channel when ggggllllXXXXSSSSwwwwaaaappppBBBBuuuuffffffffeeeerrrrssss is called
  381.      for the window that is bound to the video channel.  SSSSGGGGIIIIXXXX____vvvviiiiddddeeeeoooo____rrrreeeessssiiiizzzzeeee is
  382.      only supported on IIIInnnnffffiiiinnnniiiitttteeeeRRRReeeeaaaalllliiiittttyyyy systems.
  383.  
  384.  
  385. UUUUSSSSIIIINNNNGGGG GGGGLLLLXXXX EEEEXXXXTTTTEEEENNNNSSSSIIIIOOOONNNNSSSS
  386.      Procedure names and tokens for GLX extensions are either suffixed with
  387.      EXT, SGI, SGIS or SGIX. The meaning of these suffixes is described in
  388.      ggggllllIIIInnnnttttrrrroooo.
  389.  
  390.  
  391.  
  392.  
  393.                                                                         PPPPaaaaggggeeee 6666
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ---- GGGGLLLLXXXX                ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))
  401.  
  402.  
  403.  
  404.      All supported GLX extensions will have a corresponding definition in
  405.      glx.h and a token in the extension string returned by
  406.      ggggllllXXXXQQQQuuuueeeerrrryyyyEEEExxxxtttteeeennnnssssiiiioooonnnnssssSSSSttttrrrriiiinnnngggg.  For example, if the EEEEXXXXTTTT____vvvviiiissssuuuuaaaallll____iiiinnnnffffoooo extension
  407.      is supported, then this token will be defined in glx.h and
  408.      EEEEXXXXTTTT____vvvviiiissssuuuuaaaallll____iiiinnnnffffoooo will appear in the extension string returned by
  409.      ggggllllXXXXQQQQuuuueeeerrrryyyyEEEExxxxtttteeeennnnssssiiiioooonnnnssssSSSSttttrrrriiiinnnngggg. The definitions in glx.h can be used at compile
  410.      time to determine if procedure calls corresponding to an extension exist
  411.      in the library.
  412.  
  413.      OpenGL itself is capable of being extended.  Refer to ggggllllIIIInnnnttttrrrroooo for more
  414.      information.
  415.  
  416. GGGGLLLLXXXX 1111....1111,,,, GGGGLLLLXXXX 1111....2222,,,, GGGGLLLLXXXX 1111....3333
  417.      GLX 1.3 is now supported, and is backward compatible with GLX 1.1 and GLX
  418.      1.2.  It introduces new functionality (namely GLXFBConfigs) that
  419.      supersedes the GLX 1.2 functionality.  GLX 1.2 commands are supported,
  420.      but their use in new application development is not recommended.
  421.  
  422.      GLX 1.3 corresponds to OpenGL versions 1.2, and introduces the following
  423.      new calls: ggggllllXXXXGGGGeeeettttFFFFBBBBCCCCoooonnnnffffiiiiggggssss, ggggllllXXXXGGGGeeeettttFFFFBBBBCCCCoooonnnnffffiiiiggggAAAAttttttttrrrriiiibbbb,
  424.      ggggllllXXXXGGGGeeeettttVVVViiiissssuuuuaaaallllFFFFrrrroooommmmFFFFBBBBCCCCoooonnnnffffiiiigggg, ggggllllXXXXCCCCrrrreeeeaaaatttteeeeWWWWiiiinnnnddddoooowwww, ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyWWWWiiiinnnnddddoooowwww,
  425.      ggggllllXXXXCCCCrrrreeeeaaaatttteeeePPPPiiiixxxxmmmmaaaapppp, ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyPPPPiiiixxxxmmmmaaaapppp, ggggllllXXXXCCCCrrrreeeeaaaatttteeeePPPPbbbbuuuuffffffffeeeerrrr, ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyPPPPbbbbuuuuffffffffeeeerrrr,
  426.      ggggllllXXXXQQQQuuuueeeerrrryyyyDDDDrrrraaaawwwwaaaabbbblllleeee, ggggllllXXXXCCCCrrrreeeeaaaatttteeeeNNNNeeeewwwwCCCCoooonnnntttteeeexxxxtttt, ggggllllXXXXMMMMaaaakkkkeeeeCCCCoooonnnntttteeeexxxxttttCCCCuuuurrrrrrrreeeennnntttt,
  427.      ggggllllXXXXGGGGeeeettttCCCCuuuurrrrrrrreeeennnnttttRRRReeeeaaaaddddDDDDrrrraaaawwwwaaaabbbblllleeee, ggggllllXXXXGGGGeeeettttCCCCuuuurrrrrrrreeeennnnttttDDDDiiiissssppppllllaaaayyyy, ggggllllXXXXQQQQuuuueeeerrrryyyyCCCCoooonnnntttteeeexxxxtttt,
  428.      ggggllllXXXXSSSSeeeelllleeeeccccttttEEEEvvvveeeennnntttt, ggggllllXXXXGGGGeeeettttSSSSeeeelllleeeecccctttteeeeddddEEEEvvvveeeennnntttt.
  429.  
  430.      GLX 1.2 corresponds to OpenGL version 1.1 and introduced the following
  431.      new call: ggggllllXXXXGGGGeeeettttCCCCuuuurrrrrrrreeeennnnttttDDDDiiiissssppppllllaaaayyyy.
  432.  
  433.      GLX 1.1 corresponds to OpenGL version 1.0 and introduces the following
  434.      new calls: ggggllllXXXXQQQQuuuueeeerrrryyyyEEEExxxxtttteeeennnnssssiiiioooonnnnssssSSSSttttrrrriiiinnnngggg, ggggllllXXXXQQQQuuuueeeerrrryyyySSSSeeeerrrrvvvveeeerrrrSSSSttttrrrriiiinnnngggg, and
  435.      ggggllllXXXXGGGGeeeettttCCCClllliiiieeeennnnttttSSSSttttrrrriiiinnnngggg.
  436.  
  437.      Call ggggllllXXXXQQQQuuuueeeerrrryyyyVVVVeeeerrrrssssiiiioooonnnn to determine at runtime what version of GLX is
  438.      available. ggggllllXXXXQQQQuuuueeeerrrryyyyVVVVeeeerrrrssssiiiioooonnnn returns the version that is supported on the
  439.      connection. Thus if 1.3 is returned, both the client and server support
  440.      GLX 1.3.  You can also check the GLX version at compile time:
  441.      GLX_VERSION_1_1 will be defined in glx.h if GLX 1.1 calls are supported,
  442.      GLX_VERSION_1_2 will be defined if GLX 1.2 calls are supported, and
  443.      GLX_VERSION_1_3 will be defined if GLX 1.3 calls are supported.
  444.  
  445. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  446.      ggggllllXXXXIIIInnnnttttrrrroooo, ggggllllXXXXFFFFiiiinnnniiiisssshhhh, ggggllllXXXXFFFFlllluuuusssshhhh, ggggllllXXXXCCCChhhhoooooooosssseeeeVVVViiiissssuuuuaaaallll, ggggllllXXXXCCCCooooppppyyyyCCCCoooonnnntttteeeexxxxtttt,
  447.      ggggllllXXXXCCCCrrrreeeeaaaatttteeeeCCCCoooonnnntttteeeexxxxtttt, ggggllllXXXXCCCCrrrreeeeaaaatttteeeeGGGGLLLLXXXXPPPPiiiixxxxmmmmaaaapppp, ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyCCCCoooonnnntttteeeexxxxtttt,
  448.      ggggllllXXXXGGGGeeeettttCCCClllliiiieeeennnnttttSSSSttttrrrriiiinnnngggg, ggggllllXXXXGGGGeeeettttCCCCoooonnnnffffiiiigggg, ggggllllXXXXIIIIssssDDDDiiiirrrreeeecccctttt, ggggllllXXXXMMMMaaaakkkkeeeeCCCCuuuurrrrrrrreeeennnntttt,
  449.      ggggllllXXXXQQQQuuuueeeerrrryyyyEEEExxxxtttteeeennnnssssiiiioooonnnn, ggggllllXXXXQQQQuuuueeeerrrryyyyEEEExxxxtttteeeennnnssssiiiioooonnnnssssSSSSttttrrrriiiinnnngggg, ggggllllXXXXQQQQuuuueeeerrrryyyySSSSeeeerrrrvvvveeeerrrrSSSSttttrrrriiiinnnngggg,
  450.      ggggllllXXXXQQQQuuuueeeerrrryyyyVVVVeeeerrrrssssiiiioooonnnn, ggggllllXXXXSSSSwwwwaaaappppBBBBuuuuffffffffeeeerrrrssss, ggggllllXXXXUUUUsssseeeeXXXXFFFFoooonnnntttt, ggggllllXXXXWWWWaaaaiiiittttGGGGLLLL, ggggllllXXXXWWWWaaaaiiiittttXXXX,
  451.      ggggllllXXXXGGGGeeeettttFFFFBBBBCCCCoooonnnnffffiiiiggggssss, ggggllllXXXXGGGGeeeettttFFFFBBBBCCCCoooonnnnffffiiiiggggAAAAttttttttrrrriiiibbbb, ggggllllXXXXGGGGeeeettttVVVViiiissssuuuuaaaallllFFFFrrrroooommmmFFFFBBBBCCCCoooonnnnffffiiiigggg,
  452.      ggggllllXXXXCCCCrrrreeeeaaaatttteeeeWWWWiiiinnnnddddoooowwww, ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyWWWWiiiinnnnddddoooowwww, ggggllllXXXXCCCCrrrreeeeaaaatttteeeePPPPiiiixxxxmmmmaaaapppp, ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyPPPPiiiixxxxmmmmaaaapppp,
  453.      ggggllllXXXXCCCCrrrreeeeaaaatttteeeePPPPbbbbuuuuffffffffeeeerrrr, ggggllllXXXXDDDDeeeessssttttrrrrooooyyyyPPPPbbbbuuuuffffffffeeeerrrr, ggggllllXXXXQQQQuuuueeeerrrryyyyDDDDrrrraaaawwwwaaaabbbblllleeee,
  454.      ggggllllXXXXCCCCrrrreeeeaaaatttteeeeNNNNeeeewwwwCCCCoooonnnntttteeeexxxxtttt, ggggllllXXXXMMMMaaaakkkkeeeeCCCCoooonnnntttteeeexxxxttttCCCCuuuurrrrrrrreeeennnntttt, ggggllllXXXXGGGGeeeettttCCCCuuuurrrrrrrreeeennnnttttRRRReeeeaaaaddddDDDDrrrraaaawwwwaaaabbbblllleeee,
  455.      ggggllllXXXXGGGGeeeettttCCCCuuuurrrrrrrreeeennnnttttDDDDiiiissssppppllllaaaayyyy, ggggllllXXXXQQQQuuuueeeerrrryyyyCCCCoooonnnntttteeeexxxxtttt, ggggllllXXXXSSSSeeeelllleeeeccccttttEEEEvvvveeeennnntttt,
  456.  
  457.  
  458.  
  459.                                                                         PPPPaaaaggggeeee 7777
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466. ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))                OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee ---- GGGGLLLLXXXX                ggggllllXXXXIIIInnnnttttrrrroooo((((3333GGGG))))
  467.  
  468.  
  469.  
  470.      ggggllllXXXXGGGGeeeettttSSSSeeeelllleeeecccctttteeeeddddEEEEvvvveeeennnntttt.  XXXXCCCCrrrreeeeaaaatttteeeeCCCCoooolllloooorrrrmmmmaaaapppp, XXXXCCCCrrrreeeeaaaatttteeeeWWWWiiiinnnnddddoooowwww, XXXXSSSSyyyynnnncccc
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.                                                                         PPPPaaaaggggeeee 8888
  526.  
  527.  
  528.  
  529.